$(document).ready(function() {
				$(".addForm").validate({
					onfocusout: function(element) {
						$(element).valid();
					},
					rules: {
						name: "required",
						email: {
							required: true,
							email: true
						},
						phone: {
							required: true,
							isPhone: true,
						},
						major: {
							required: true,
						},
						graduate_college: {
							required: true,
						},
						description: "required"
					},
					messages: {
						name: "请输入姓名",
						email: {
							required: "请输入Email地址",
							email: "请输入正确的email地址"
						},
						phone: {
							required: "请输入联系号码",
							isPhone: "请正确填写您的联系号码"
						},
						major: {
							required: "请输入所学专业",
						},
						graduate_college: {
							required: "请输入毕业院校",
						},
						description: "请输入描述内容"
					}
				});
				//-----------------ajax根据下拉框显示便签内容----------------------
							function selectAjax() {
								$.ajax({
										type: "GET",
										url: "${pageContext.request.contextPath}/user/roleSubmit.do",
										data: {
											type_code: '${type_code}',
											code: $("#select").val(),
										},
										dataType: 'json',
										success: function(result) {
											var json = eval(result);
											$.each(json, function(index, item) {
												//循环获取数据    
												var code = json[index].code;
												var value = json[index].value;
												$(".changeLabel")
													.append(
														"<input value=' " + code + " ' type='checkbox'" +
														"style='vertical-align:middle;'>" + "<span style=' " + " vertical-align:middle;'>" + value + "</span>");
											});
										}
									});
							};
							//-----------------ajax结束----------------------
							//设计师标签
							$(".dic_designerLabels").each(function(dictionary){
								$(".designerLabels").each(function(designer){
									var dic_designerLabel=$(".dic_designerLabels").eq(dictionary).text();
									var designerLabel=$(".designerLabels").eq(designer).text();
									if(dic_designerLabel==designerLabel){
										$(".dic_designerLabels").eq(dictionary).prev().attr("checked",true);
									}
								});
							});
							//性别
							$(".sex").each(function(index){
								var designerSex=$(".designerSex").text();
								var sex=$(".sex").eq(index).val();
								if(designerSex==sex){
										$(".sex").eq(index).attr("checked",true);
									}
							});
							
			});
